import Vue from 'vue'
import App from './App'
// import "lib-flexible-computer";
import router from './router'
import ElementUI from 'element-ui'
import Vuex from 'vuex'
import store from './store/index.js'
import 'animate.css';
import 'element-ui/lib/theme-chalk/index.css';
import axios from "axios";

import { setCookie,setCookie2, getCookie, checkCookie, clearCookie } from '@/utils/cookie';
import '@/utils/rem'
import {postRequest} from "./utils/api";
import {putRequest} from "./utils/api";
import {getRequest} from "./utils/api";
import {deleteRequest} from "./utils/api";

//md5加密插件
import md5 from 'js-md5';
Vue.prototype.$md5 = md5;

//插件
Vue.prototype.postRequest = postRequest;
Vue.prototype.putRequest = putRequest;
Vue.prototype.getRequest = getRequest;
Vue.prototype.deleteRequest = deleteRequest;

/**
 * 使用cookie.js中的方法
 */
Vue.prototype.$setCookie = setCookie;
Vue.prototype.$setCookie2 = setCookie2;
Vue.prototype.$getCookie = getCookie;
Vue.prototype.$checkCookie = checkCookie;
Vue.prototype.$clearCookie = clearCookie;

Vue.config.productionTip = false

Vue.config.productionTip = false
Vue.use(ElementUI);
Vue.use(Vuex)

axios.defaults.withCredentials = true
// var axios = require('axios')
Vue.prototype.$axios = axios

new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
